<!DOCTYPE html>
<html lang="">
	<head>
	    <meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	    <include file="Share:meta" />
	</head>
	<body>
	<div id="orderList">
		<div class="header">
	        <div class="col-xs-3 textcenter">
	           <!--  <a href="/bizcard/detail/hash/{$hash}"><返回</a> -->
	        </div>
	        <div class="col-xs-6 textcenter">
	            <a href="#"><span id="titleId">支付成功</span></a>
	        </div>
	        <div class="col-xs-3 textcenter">
	        </div>
	    </div>
		<div id="four" class="container-fluid bg_white">
			<div class="row Mob_Row_Padd_M_2" style="margin-top: 40px;">
				<div class="col-xs-2"></div>
				<div class="col-xs-8 text-center">
					<i class="fa fa-check-circle-o fa-5x" style="color:#058e0c"></i><br>
					<h4 style="color:#058e0c" class="fontbold16">支付成功！<br>	请留下您的微信联系方式</h4><br>
					<br>
				</div>
<!-- 
				<div class="col-xs-12" style="color:#058e0c">
					<div class="textcenter fontbold16">客服将在24小时内联系您</div>
					<div class="textcenter fontbold16">或主动联系客服</div>
					<div class="textcenter fontbold16">客服电话：4008-5008-67</div>

				</div> -->
			</div>
			<div class="row Mob_Row_Padd_M_2">
				<input type="hidden" name="orderInfo.order_no"  class="form-control" v-bind:value="orderInfo.order_no" v-model="orderInfo.order_no">

				<div class="form-group">
					<label for="input" class="col-xs-3 control-label">手机:</label>
					<div class="col-xs-9">
						<input type="text" name="contact_mobile" id="contact_mobile" class="form-control" value="" required="required" v-model="orderInfo.contact_mobile">
					</div>
				</div>
			</div>
			<div class="clear"></div>
			<div class="div_line"></div>
			<div class="row Mob_Row_Padd_M_2">
				<div class="form-group">
					<label for="input" class="col-xs-3 control-label">微信:</label>
					<div class="col-xs-9">
						<input type="text" name="contact_weixin" id="contact_weixin" class="form-control" value="" required="required" v-model="orderInfo.contact_weixin">
					</div>
				</div>
			</div>
			<div class="clear"></div>
			<div class="div_line"></div>

			<div class="row Mob_Row_Padd_M_2 margin_top20">
				<div class="col-xs-12">
					<button  class="btn btn-success" href="#" role="button" style="width: 100%;" @click="updateOrder();">保存</button>
				</div>
			</div>
		</div>

	</div>
	</body>
	<script type="text/javascript">
		var HjVue = new Vue({
			el: '#orderList',
			data: {
				orderInfo:{
					'order_no' : '{$orderno}',
					'contact_qq' : '',
					'contact_weixin' : '',
					'contact_mobile' : '{$mobile}'
				}
			},
			methods:{
				updateOrder: function(){
					if(this.orderInfo.contact_weixin == ''){
						alert('请输入微信联系方式');
						return;
					}
					$.ajax({
	                    type: "POST",
	                    url: "/Api/updateOrder?hash={$hash}",
	                    data: this.orderInfo,
	                    dataType: "json",
	                    success: function(result, opt){
	                        if (result.status=='1'){
	                        	alert('保存成功');
								window.location.href = "/bizcard/detail/hash/{$hash}";
	                        }else if (result.status=='-1'){
	                        	alert(result.msg);
	                        }else{
	                        	alert('保存失败');
	                        }
	                    },
	                    error: function(){
	                        alert('保存失败');
	                    }
	                });
				}
			}
		});
	</script>
</html>